package com.mapper;

import com.pojo.bOrders;
import com.test.Orders;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author ACER
* @description 针对表【tb_orders】的数据库操作Mapper
* @createDate 2024-11-14 14:04:08
* @Entity com.pojo.bOrders
*/
public interface bOrdersMapper {

    int deleteByPrimaryKey(Long id);

    int insert(bOrders record);

    int insertSelective(bOrders record);

    bOrders selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(bOrders record);

    int updateByPrimaryKey(bOrders record);
Orders findOrdersWithProduct(   Integer id);
@Select("select * from tb_orders where user_id=#{id}")
@Results({@Result(id = true, column = "id", property = "id"),
        @Result(column = "number", property = "number")})
    List<Orders>selectOrdersByUserId(int user_id);
}
